﻿using Dexter.Dependency;

namespace Dexter.Scheduler.Extensions {
	public static class ContainerExtensions {
		/// <summary>
		/// Registers the job.
		/// </summary>
		/// <typeparam name="TK">The type of the K.</typeparam>
		/// <param name="container">The container.</param>
		/// <param name="uniqueName">Name of the unique must be the same value returned by the property <see cref="IJob.UniqueId"/>.</param>
		/// <param name="lifeCycle">The life cycle.</param>
		public static void RegisterJob < TK> ( this IDexterContainer container , string uniqueName,  LifeCycle lifeCycle ) where TK : class , IJob {
			container.Register<IJob, TK> ( uniqueName, lifeCycle );
		}
	}
}